<?php 
/**
 * File: View - Conteudo - add.phtml
 */
 
 $this->jQuery()
	 ->addJavascriptFile( $this->layout_base . '/third/js/tree.view.js')
	 ->addJavascriptFile( $this->layout_base . '/third/js/tiny_mce/jquery.tinymce.js')
	 ->addJavascriptFile( $this->layout_base . '/third/js/modules/conteudo.js');
	 
	$this
	->headLink()
	->appendStylesheet( $this->layout_base . '/third/css/categorias.css');

?>
			<div class="page-title ui-widget-content ui-corner-all">
				<div>
					<div class="float-left">
						<br />
							<h1>Conte&uacute;do <?php if( $this->categoria['titulo']) echo " -  Categoria: ".$this->categoria['titulo']; ?></h1>
					</div>
					
					<div class="button float-right">
						<a href="/third/conteudo"  class="btn ui-state-default"><span class="ui-icon ui-icon-circle-triangle-w"></span>Voltar para listagem</a>
					</div>

					<div class="clearfix"></div>
				</div>
					<!-- OPCOES -->
						<div>
							<div class="portlet">
								<div class="portlet-header">Conte&uacute;do<?php if($this->categoria['titulo']) echo " - Categoria: ".$this->categoria['titulo']?></div>
								<div class="portlet-content">
									<?php 
										if( $this->formErro ){
											echo "<div class='response-msg error ui-corner-all'>".$this->formErro."</div>"; 
										}
									?>
									<?php echo $this->form ?>
								</div>
							</div>	
						</div>
			</div>
		<?php 
		//SIDEBAR - CATEGORIAS
			$this->placeholder('sidebar')->captureStart('SET', 'data');
		?>
				<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
					<div class="portlet-header">Categorias</div>
					<div class="portlet-content">
						<?php 
							if( $this->categorias ){
								echo Third_Funcs::arrayToULEdit( $this->categorias, '/third/conteudo/index/id/', true );
							}
						?>
					</div>
				</div>
				<script type="text/javascript">	
				$(document).ready(function() { 
					var treeIds = ['categorias_tree_content'] ;
					var tree = new TreeView( treeIds );
				});
				</script>
		<?php 
			$this->placeholder('sidebar')->captureEnd();
		?>
